package com.amazon.service;

import com.amazon.bo.Shop;
import com.amazon.dao.ShopDao;
import com.amazon.web.util.Send253SMS;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
import java.util.List;

@Service("shopService")
public class ShopService {
    @Resource
    private ShopDao shopDao;
    @Resource
    private SMSCodeService smsCodeService;
    @Resource
    private Send253SMS send253SMS;
    @Resource
    I18nService i18nService;

    //根据店铺名称查询
    public Shop getShopByName(String shopname){
        Shop m= shopDao.getShopByName(shopname);
        if(m!=null){
            return m;
        }
        return null;
    }
    //店铺列表
    public List<Shop> getShopList( int page, int pageSize){
        List<Shop> lst=shopDao.getShopList(page,pageSize);
        if(lst!=null){
            return lst;
        }
        return null;
    }

    public boolean saveShop(Shop shop){
        return shopDao.saveShop(shop);
    }


    public Object selectShopList(long uid) {

        return shopDao.selectShopList(uid);
    }

    public Object selectShopInfo(long uid) {

        return shopDao.selectShopInfo(uid);
    }

    public  Shop getById(Long i) {
        return shopDao.getById(i);
    }

    public Object getShopList(int userid,final int page, final int pageSize){
        return shopDao.getShopList(userid,page,pageSize);
    }

    //获店铺详情
    public Object getShopDetail(int shopid){
        return shopDao.getShopDetail(shopid);
    }


}
